package store.lunangangster.bpmn.model;

public class UserTask extends Task {

  protected Candidate candidate;

  public Candidate getCandidate() {
    if (candidate == null) {
      candidate = new Candidate();
    }
    return candidate;
  }

  public void setCandidateUser(String username) {
    getCandidate().setUsername(username);
  }

  public void setCandidateGroup(String group) {
    getCandidate().setGroup(group);
  }

  public void setCandidate(Candidate candidate) {
    this.candidate = candidate;
  }

  public static class Candidate {
    private String username;
    private String group;

    public Candidate() {
    }

    public Candidate(String username, String group) {
      this.username = username;
      this.group = group;
    }

    public String getUsername() {
      return username;
    }

    public void setUsername(String username) {
      this.username = username;
    }

    public String getGroup() {
      return group;
    }

    public void setGroup(String group) {
      this.group = group;
    }
  }

  @Override
  public String getModelType() {
    return "USER_TASK";
  }
}
